package domain;

import java.io.Serializable;

/**
 * @TableName account
 */
public class Account implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 编号
     */
    private Integer id;
    /**
     * 登录账号
     */
    private String email;
    /**
     * 登录密码
     */
    private String pwd;

    /**
     * 编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 登录账号
     */
    public String getEmail() {
        return email;
    }

    /**
     * 登录账号
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 登录密码
     */
    public String getPwd() {
        return pwd;
    }

    /**
     * 登录密码
     */
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Account other = (Account) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
                && (this.getPwd() == null ? other.getPwd() == null : this.getPwd().equals(other.getPwd()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getPwd() == null) ? 0 : getPwd().hashCode());
        return result;
    }

    @Override
    public String toString() {
        final StringBuilder sb;
        sb = new StringBuilder("Account{");
        sb.append("id=").append(id);
        sb.append(", email='").append(email).append('\'');
        sb.append(", pwd='").append(pwd).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public Account(Integer id, String email, String pwd) {
        this.id = id;
        this.email = email;
        this.pwd = pwd;
    }
}